import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    value:1,
    token:''
  },
  getters: {
  },
  mutations: {
    setValue(state,value){
      //3
      state.value = value

    },

    setToken(state,token){

      state.token = token
    }
  },
  actions: {
    setValue(context,value){
      //2
      context.commit('setValue',value)
    }
  },
  modules: {
  }
})
